cd "E:\Stata Output"
use "D:\Dropbox\InformedVoting\proposals.dta", clear
egen ind_year_n=group(ind_year)
g siccd_year = siccd*10000+year
egen siccd_year_n=group(siccd_year)
egen agenda_n=group(issagendaitemid)
g agenda_year = agenda_n*10000+year


**** Table 5
reghdfe car63d_ff4 net_win_informed net_win_uninformed mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst, cluster(permno) absorb(agenda_n ind year)
test net_win_informed=net_win_uninformed
outreg using informed_t5a.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay replace
reghdfe car126d_ff4 net_win_informed net_win_uninformed mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst, cluster(permno) absorb(agenda_n ind year)
test net_win_informed=net_win_uninformed
outreg using informed_t5a.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace
reghdfe car252d_ff4 net_win_informed net_win_uninformed mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst, cluster(permno) absorb(agenda_n ind year)
test net_win_informed=net_win_uninformed
outreg using informed_t5a.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace
reghdfe car378d_ff4 net_win_informed net_win_uninformed mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst, cluster(permno) absorb(agenda_n ind year)
test net_win_informed=net_win_uninformed
outreg using informed_t5a.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace



reghdfe car63d_dgtw net_win_informed net_win_uninformed mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst if car63d_dgtw ~= ., cluster(permno) absorb(agenda_n ind year)
test net_win_informed=net_win_uninformed
outreg using informed_t5b.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay replace
reghdfe car126d_dgtw net_win_informed net_win_uninformed mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst if car63d_dgtw ~= ., cluster(permno) absorb(agenda_n ind year)
test net_win_informed=net_win_uninformed
outreg using informed_t5b.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace
reghdfe car252d_dgtw net_win_informed net_win_uninformed mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst if car63d_dgtw ~= ., cluster(permno) absorb(agenda_n ind year)
test net_win_informed=net_win_uninformed
outreg using informed_t5b.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace
reghdfe car378d_dgtw net_win_informed net_win_uninformed mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst if car63d_dgtw ~= ., cluster(permno) absorb(agenda_n ind year)
test net_win_informed=net_win_uninformed
outreg using informed_t5b.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace


**** Table 6
* Use contentious proposals held at firms with more liquid stock
use "D:\Dropbox\InformedVoting\proposals_liq.dta", clear
egen ind_year_n=group(ind_year)
egen agenda_n=group(issagendaitemid)
g agenda_year = agenda_n*10000+year

reghdfe car126d_ff4 net_win_informed net_win_uninformed mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst, cluster(permno) absorb(agenda_n ind year)
test net_win_informed=net_win_uninformed
outreg using informed_t6.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay replace

reghdfe car126d_dgtw net_win_informed net_win_uninformed mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst if car63d_dgtw ~= ., cluster(permno) absorb(agenda_n ind year)
test net_win_informed=net_win_uninformed
outreg using informed_t6.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace

* Confine contentious proposals to those that pass or fail within ±10% around the passing threshold
use "D:\Dropbox\InformedVoting\proposals10.dta", clear
egen ind_year_n=group(ind_year)
egen agenda_n=group(issagendaitemid)
g agenda_year = agenda_n*10000+year

reghdfe car126d_ff4 net_win_informed net_win_uninformed mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst, cluster(permno) absorb(agenda_n ind year)
test net_win_informed=net_win_uninformed
outreg using informed_t6.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace

reghdfe car126d_dgtw net_win_informed net_win_uninformed mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst if car63d_dgtw ~= ., cluster(permno) absorb(agenda_n ind year)
test net_win_informed=net_win_uninformed
outreg using informed_t6.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace


* Construct the vote alpha by weighting the votes equally 
use "D:\Dropbox\InformedVoting\proposals.dta", clear
egen ind_year_n=group(ind_year)
egen agenda_n=group(issagendaitemid)
g agenda_year = agenda_n*10000+year

reghdfe car126d_ff4 net_win_informed_ew net_win_uninformed_ew mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst, cluster(permno) absorb(agenda_n ind year)
test net_win_informed_ew=net_win_uninformed_ew
outreg using informed_t6.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace

reghdfe car126d_dgtw net_win_informed_ew net_win_uninformed_ew mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst if car63d_dgtw ~= ., cluster(permno) absorb(agenda_n ind year)
test net_win_informed_ew=net_win_uninformed_ew
outreg using informed_t6.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace


**** Table 7: Cross-sectional tests
* blanket recommendations
use "D:\Dropbox\InformedVoting\proposals_blanket.dta", clear
egen ind_year_n=group(ind_year)
g siccd_year = siccd*10000+year
egen siccd_year_n=group(siccd_year)
egen agenda_n=group(issagendaitemid)
g agenda_year = agenda_n*10000+year

g x = blanket
g net_win_informed_x = net_win_informed*x
g net_win_uninformed_x = net_win_uninformed*x

reghdfe car126d_ff4 net_win_informed_x net_win_uninformed_x net_win_informed net_win_uninformed x mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst, cluster(permno) absorb(agenda_n ind year)
test net_win_informed_x=net_win_uninformed_x
outreg using informed_t7.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay replace
reghdfe car126d_dgtw net_win_informed_x net_win_uninformed_x net_win_informed net_win_uninformed x mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst, cluster(permno) absorb(agenda_n ind year)
test net_win_informed_x=net_win_uninformed_x
outreg using informed_t7.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace



use "D:\Dropbox\InformedVoting\proposals.dta", clear
egen ind_year_n=group(ind_year)
egen agenda_n=group(issagendaitemid)
g agenda_year = agenda_n*10000+year

* prior contested
g x = 0
replace x = 1 if frac_contested > 0 & frac_contested ~= .
g net_win_informed_x = net_win_informed*x
g net_win_uninformed_x = net_win_uninformed*x
sum x

reghdfe car126d_ff4 net_win_informed_x net_win_uninformed_x net_win_informed net_win_uninformed x mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst, cluster(permno) absorb(agenda_n ind year)
test net_win_informed_x=net_win_uninformed_x
outreg using informed_t7.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace
reghdfe car126d_dgtw net_win_informed_x net_win_uninformed_x net_win_informed net_win_uninformed x mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst, cluster(permno) absorb(agenda_n ind year)
test net_win_informed_x=net_win_uninformed_x
outreg using informed_t7.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace


* low industry-adjusted stock performance
drop net_win_informed_x net_win_uninformed_x x

g x = 0
replace x = 1 if ret1y_adj < -.1
g net_win_informed_x = net_win_informed*x
g net_win_uninformed_x = net_win_uninformed*x
sum x

reghdfe car126d_ff4 net_win_informed_x net_win_uninformed_x net_win_informed net_win_uninformed x mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst, cluster(permno) absorb(agenda_n ind year)
test net_win_informed_x=net_win_uninformed_x
outreg using informed_t7.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace
reghdfe car126d_dgtw net_win_informed_x net_win_uninformed_x net_win_informed net_win_uninformed x mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst, cluster(permno) absorb(agenda_n ind year)
test net_win_informed_x=net_win_uninformed_x
outreg using informed_t7.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace



* low institutional ownership
drop net_win_informed_x net_win_uninformed_x x

g x = 0
replace x = 1 if r_io == 0
g net_win_informed_x = net_win_informed*x
g net_win_uninformed_x = net_win_uninformed*x

reghdfe car126d_ff4 net_win_informed_x net_win_uninformed_x net_win_informed net_win_uninformed x mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst, cluster(permno) absorb(agenda_n ind year)
test net_win_informed_x=net_win_uninformed_x
outreg using informed_t7.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace
reghdfe car126d_dgtw net_win_informed_x net_win_uninformed_x net_win_informed net_win_uninformed x mgmt_win iss_win mgmt_lost_nc size mb car_pr252d_m leverage_b capex sp500 mfo log_nanalyst, cluster(permno) absorb(agenda_n ind year)
test net_win_informed_x=net_win_uninformed_x
outreg using informed_t7.doc, bdec(3) starlevels(10 5 1) tdec(2) summstat(N\r2_a) nodisplay merge replace




